package com.studio701.carguard.controller;



import com.studio701.carguard.pojo.ReportCar;
import com.studio701.carguard.pojo.ReportHuman;
import com.studio701.carguard.service.IReportCarService;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xjc
 * @since 2022-03-29
 */
@RestController
@RequestMapping("/report-car")
public class ReportCarController {

    @Autowired
    IReportCarService iReportCarService;

    @ApiOperation("添加报表车俩信息")
    @PostMapping("/")
    public boolean insertReportCar(@RequestBody ReportCar reportCar){
        return iReportCarService.save(reportCar);
    }

    @ApiOperation("获取报表车辆信息")
    @GetMapping("/")
    ReportCar getById(Integer id){
        return iReportCarService.getById(id);
    }
}
